#include "fins.h"
#include "ui_fins.h"

Fins::Fins(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::Fins)
{
    ui->setupUi(this);

    MsgCounter = 0;

    QTimer *timer = new QTimer(this);
    connect(timer, SIGNAL(timeout()), this, SLOT(Timer1sec()));
    timer->start(1000);

//    qDebug()<<"init fins";
//    qDebug()<<this->objectName();

    for (int i = 0; i < 20; i++)
    {
        W[i] = i;
    }

}

Fins::~Fins()
{
    delete ui;
}

void Fins::Timer1sec()
{
    MsgCounter++;
    W[10] = MsgCounter;
    for (int i = 0; i < 512; i++)
    {
        W[i] = i+MsgCounter;
    }
    ui->textEdit->append(QString::number(MsgCounter));
    emit from_fins_out();

}
